package com.coffee.daili.api.service;

import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;
import com.coffee.daili.api.query.DailiMerchantQuery;
import com.coffee.daili.api.req.InsertMerchantReq;
import com.coffee.daili.api.result.DailiMerchantResult;

import java.util.List;
import java.util.Map;
import java.util.Set;


public interface DailiMerchantService {

    Page<DailiMerchantResult> getPager(DailiMerchantQuery param, PagerInfo pr);

    Integer count(DailiMerchantQuery param);

    DailiMerchantResult getDetail(Integer id);

    List<DailiMerchantResult> getList(DailiMerchantQuery param, PagerInfo pr);

    List<DailiMerchantResult> getList(DailiMerchantQuery param);

    List<DailiMerchantResult> getList();

    void delete(Integer id);

    void add(InsertMerchantReq req) throws BusinessException;

    void apply(InsertMerchantReq req) throws BusinessException;

    void update(DailiMerchantResult result) throws BusinessException;

    void updateByMerchant(DailiMerchantResult result) throws BusinessException;

    void updateQuota(DailiMerchantResult result) throws BusinessException;

    void examine(DailiMerchantResult result) throws BusinessException;


    Map<Integer, DailiMerchantResult> getItemMap(Set<Integer> idSet);

    Map<Integer, DailiMerchantResult> getItemMap();

    Page<DailiMerchantResult> getListByMerchantId(Integer merchantId, String date, PagerInfo pr);

    Page<DailiMerchantResult> getMerchantListByMerchantId(String mobile, Integer merchantId, PagerInfo pr);

    Boolean dailiMerchantIsHaving(String mobile, String dailiMobile) throws BusinessException;


}